{{ template "header" . }}
{{ template "recent" . }}

<main id=two-pane>
    {{ template "nav" . }}

    <table class="nowrap-first-second sticky">
        <thead>
            <tr>
                <th>Hole
                <th>Golfer
                <th class="right wide">{{ title .Data.Scoring }}
                <th class="right wide">Time
                <th class=right>Submitted
        <tbody>
        {{ $name := "" }}
        {{ with .Golfer }}{{ $name = .Name }}{{ end }}

        {{ range .Data.Rows }}
            <tr {{ if eq $name .Name }} class=me {{ end }}>
                <td>
                    <a href="/{{ .Hole.ID }}#{{ .Lang.ID }}">
                        {{ svg .Lang.ID "class" "thin" }}
                        <span>{{ .Hole.Name }}</span>
                    </a>
                <td>{{ template "golfer-link" . }}
                <td class=wide title="
                    {{- if eq .TieCount 1 }}Uncontested {{ else }}Joint {{ end -}}
                    {{ if eq .Golfers 1 }}solve {{ else }}{{ .Rank }}{{ ord .Rank }} {{ end -}}
                    with {{ comma .Strokes }} {{ $.Data.Scoring }} in {{ .Lang.Name }}">
                    <a href="/golfers/{{ .Name }}/{{ .Hole.ID }}/{{ .Lang.ID }}/{{ $.Data.Scoring }}">
                        {{ if .Experimental }}{{ svg "flask" }}
                        {{ else if eq .Golfers 1 }}🦄
                        {{ else if eq .Rank 1 }}{{ if eq .TieCount 1 }}💎{{ else }}🥇{{ end }}
                        {{ else if eq .Rank 2 }}🥈
                        {{ else if eq .Rank 3 }}🥉
                        {{ end }}
                        <span class=right>{{ comma .Strokes }}</span>
                        {{ svg .Lang.ID }}
                    </a>
                <td class="right wide">{{ duration .Time }}
                <td class=right>{{ time (.Submitted.In $.Location) }}
        {{ end }}
    </table>
</main>

{{ template "footer" }}
